package me.date.a03test;

import java.time.LocalDate;
import java.time.temporal.ChronoUnit;

public class Test4 {
    public static void main(String[] args) {
        //计算活了多少天，用JDK8
        LocalDate ld1 = LocalDate.of(2006, 9, 2);
        //当前时间
        LocalDate ld2 = LocalDate.now();
        long days = ChronoUnit.DAYS.between(ld1, ld2);
        System.out.println(days);

        //判断是否是闰年
        System.out.println(ld1.isLeapYear());
    }
}
